﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>报价系数</title>
    <script src="~/Content/jquery-easyui-1.5.2/jquery.min.js"></script>
    <script src="~/Content/jquery-easyui-1.5.2/jquery.easyui.min.js"></script>
    <script src="~/Content/jquery-easyui-1.5.2/locale/easyui-lang-zh_CN.js"></script>
    <link href="~/Content/jquery-easyui-1.5.2/themes/bootstrap/easyui.css" rel="stylesheet" />
    <link href="~/Content/jquery-easyui-1.5.2/themes/icon.css" rel="stylesheet" />
    <script src="~/Content/layer/layer.js"></script>
    <link href="~/Content/layer/skin/default/layer.css" rel="stylesheet" />
</head>
<body class="easyui-layout">
    <div data-options="region:'center'" style="padding:0 10px 5px 10px;background:#eee;">
        <table id="grid-list"> </table>
    </div>
    <script>
        $(function () {

            Grid.LoadData();

        });
        var Grid = {
            LoadData: function () {
                Grid.list = $("#grid-list").datagrid({
                    title:'物流价格系数',
                    url: "/Supplier/List",
                    fit: true,
                    fitColumns: true,
                    singleSelect: true,
                    rownumbers: true,
                    columns: [[
                        { field: 'FName', title: '物流供应商', width: 100, align: 'center' },
                        {
                            field: 'FItemId', title: '操作', width: 60, align: 'center' , formatter: function (value, row, index) {
                                return  '<a href="#" onclick="Grid.ShowDetail(' + value + ",'"+row.FName+"'"+')">编辑</a>';
                            }
                        }
                    ]],
                    onSelect: function (index, row) {
                        Grid.list.datagrid("unselectAll");
                    }
                });
            },
            ShowDetail: function (fitemid,fname) {
             var index=   layer.open({
                    type: 2,
                    title: '报价系数【'+fname+'】',
                    shadeClose: true,
                    shade: false,
                    maxmin: true, //开启最大化最小化按钮
                    area: ['893px', '600px'],
                    content: '/Sys/CofDetail?FItemId=' + fitemid,
                    btns: 1,
                    btn: ['保存'],
                    yes: function (index) {
                        CofDetail.Save();
                    }
                });
             layer.full(index);
            }
        }
    </script>
</body>
</html>
